﻿using System.Collections;
using System.Configuration;
using System.Text;
using MPMovieCatalog.Util;

namespace MPMovieCatalog.Configuration.Sections
{
    public sealed class AMCExportSection : PropertySection
    {
        [ConfigurationProperty("fileName")]
        private PropertyElement m_fileName
        {
            get
            {
                PropertyElement fileName = (PropertyElement)base["fileName"];
                return fileName;
            }

            set
            {
                base["fileName"] = value;
            }
        }

        [ConfigurationProperty("encoding")]
        private PropertyElement m_encoding
        {
            get
            {
                PropertyElement encoding = (PropertyElement)base["encoding"];
                return encoding;
            }

            set
            {
                base["encoding"] = value;
            }
        }

        [ConfigurationProperty("movies")]
        private PropertyElement m_movies
        {
            get
            {
                PropertyElement movies = (PropertyElement)base["movies"];
                return movies;
            }

            set
            {
                base["movies"] = value;
            }
        }

        public string FileName
        {
            get
            {
                return m_fileName.Value;
            }
            set
            {
                SetProperty("fileName", value);
            }
        }

        public string Encoding
        {
            get
            {
                return m_encoding.Value;
            }
            set
            {
                SetProperty("encoding", value);
            }
        }

        public int Movies
        {
            get
            {
                return m_movies.ValueAsInt;
            }
            set
            {
                SetProperty("movies", value.ToString());
            }
        }
    }
}
